import { use } from 'echarts/core'
import {
  PieChart,
  BarChart,
  LineChart,
  RadarChart,
  GaugeChart,
} from 'echarts/charts'
import {
  GridComponent,
  TooltipComponent,
  LegendComponent,
  ToolboxComponent,
} from 'echarts/components'
import { CanvasRenderer } from 'echarts/renderers'
import VChart from 'vue-echarts'

export default function install (Vue) {
  use([
    PieChart,
    BarChart,
    LineChart,
    RadarChart,
    GaugeChart,
    GridComponent,
    TooltipComponent,
    LegendComponent,
    ToolboxComponent,
    CanvasRenderer
  ])
  Vue.component('v-chart', VChart)
}
